<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('cou/index')}">优惠券列表</a></li>
			<li><a href="{:url('cou/add')}">设置优惠券</a></li>
		</ul>
		<form  method="post" class="margin-top-20">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th width="40">ID</th>
						<th align="left">优惠券</th>
						<th align="left">使用范围</th>
						<th align="left">开始时间</th>
						<th align="left">结束时间</th>
						<th>状态</th>
						<th width="160">操作</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="data" item="vo" key="k">
					<tr>
						<td>{$k+1}</td>
						<td>{$vo.con}</td>
						<td>{$vo.scope_name}</td>
						<td>{$vo.s_time|date='Y-m-d H:i:s',###}</td>
						<td>{$vo.e_time|date='Y-m-d H:i:s',###}</td>
						<td>{$vo.status_name}</td>
						<td>
						<if condition="$vo.status eq 1">
							<a href="{:url('cou/upstatus',array('cou_guid'=>$vo['cou_guid'],'status'=>2))}">关闭</a>
						<else/>
							<a href="{:url('cou/upstatus',array('cou_guid'=>$vo['cou_guid'],'status'=>1))}">开启</a>
						</if>
							<a href="{:url('cou/detail',array('cou_guid'=>$vo['cou_guid']))}">{:lang('EDIT')}</a>
							<a class="js-ajax-delete" href="{:url('cou/del',array('cou_guid'=>$vo['cou_guid']))}">{:lang('DELETE')}</a>
						 </td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>